sort an array by characters length in js

121

sort an array by characters length in js -

arr.sort((a, b) => a.length - b.length)

Comments

Submit
0 Comments